
export default function reducer(state = [] ,action){

    console.log(state,action);
    let _arr = [ ...state] 

    switch(action.type){
        case 'add' :
        _arr.push(action.data) 
        return _arr; 

        default : return _arr;
    } 
}